﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <link href="/css/bootstrap.min.css" rel="stylesheet" type="text/css" />
    <script src="/js/jquery-1.6.2.min.js" type="text/javascript"> </script>
    <script src="/js/bootstrap.min.js" type="text/javascript"> </script>
    <script src="/services/EventFetchingClientSideService.js" type="text/javascript"> </script>
    <script src="/js/knockout-1.2.1.js" type="text/javascript"> </script>
    </head>
<body>
    <script type="text/javascript">

        function RunTest() {
            var request = { LastTimeStampFetched: 0, Precision: "hour", Categories: ["ProfilingApp.Handlers.SecurityHandler.CreateCustomerResponse"] };

            var service = new dishdash.services.EventFetchingClientSideService();

            var getCategoryDataByPrecisionCallback = function(response) {
                alert(response.PrecisionDocuments.length + " items found matching ProfilingApp.Handlers.SecurityHandler.CreateCustomerResponse");
            };

            service.GetCategoryDataByPrecision(request, getCategoryDataByPrecisionCallback);
        }

        ;

    </script>

    <h1>DishDash Dashboard Test Page: UI to Middleware Test:</h1>
    <h2> Invoke GetCategoryData operation on CategoryService</h2>
    <br />
    <p>This simple functional test is designed to test the interaction between the html front end, The javascript service wrapper and the middleware service of the Dishdash Dashboard.</p>
    <p>Once clicked, the button invokes a piece of inline javascript, which in turn invokes an external javascript wrapper, the wrapper will then invoke the middleware service and the result of which will be returned.</p>
    <br />
    <br />
    <!--<button data-bind="click: addCategory">Add category</button>-->
    <br />
    <br />
    <input type="button" value="Run" onclick=" RunTest() " />

</body>
</html>
